This is G o o g l e's cache of http://www.rockbox.org/twiki/bin/view/Main/PluginSearchengine as retrieved on 8 Sep 2005 10:59:21 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:p847141zjOcJ:www.rockbox.org/twiki/bin/view/Main/PluginSearchengine+site:rockbox.org+inurl:pluginsearchengine&hl=en&client=firefox


Google is neither affiliated with the authors of this page nor responsible for its content.
These search terms have been highlighted: pluginsearchengine 

Rockbox . Main . PluginSearchengine

 Rockbox Logo 

home
download
documentation
mailing lists
wiki
IRC
forums
daily builds
feature requests
bug reports
patches


SourceForge.net Logo

Rockbox > Main > PluginSearchengine
Main . { Users | Changes | Index | Search | Register | Go }

Searchengine

General

You are supposed to use the PluginDatabox to create search queries and you use this plugin to actually run those searches.

Items in blue are planned but not implemented yet.

Search Expression Language

Autorating is (playcount-playcountmin)*10/(playcountmax-playcountmin)

In EBNF:

NUMARG := number | numberid
STRARG := string | stringid

NUMOP : = '>' | '>=' | '<' | '<=' | '!=' | '=='
STROP : = CONTAINS | EQUALS | STARTSWITH | ENDSWITH

COMPARE : = NUMARG NUMOP NUMARG | STRARG STROP STRARG

EXPR := COMPARE | NOT EXPR | LPAREN MEXPR RPAREN

LEXPR := EXPR (AND EXPR)*

MEXPR := LEXPR (OR LEXPR)*

CLIPPING := PLAYTIME number | COUNT number

SORTTYPE := (LOWEST|HIGHEST) (rating | playcount | year | tracknumber)

QUERY := MEXPR (SORTBY SORTTYPE (AND SORTTYPE)*)? (CLIPBY CLIPPING)? (SHUFFLE)? EOF

numberid := year | rating | playcount | autorating | tracknumber
stringid := title | genre | artist | album | filename

Tokenfile description

Token Types

Token type ID Description
EOF 0 End of file / search
NOT 1 invert expression operator
AND 2 and expression operator
OR 3 or expression operator
GT 4 GreaterThan ( > ) number operator
GTE 5 GreaterThanorEqual ( >= ) number operator
LT 6 LessThan ( < ) number operator
LTE 7 LessThanorEqual ( <= ) number operator
EQ 8 Equal ( == ) number operator
NE 9 NotEqual ( != ) number operator
CONTAINS 10 contains string operator
EQUALS 11 equals string operator
STARTSWITH 12 startswith string operator
ENDSWITH 13 startswith string operator
LPAREN 14 '(' open new multiple-expression
RPAREN 15 ')' close previously opened multiple-expression
NUM 16 Number, value stored in intvalue
NUMID 17 Number property of a song, intvalue holds numberid (see NumberID intvalues)
STRING 18 String, stored in spelling
STRINGID 19 String property of a song, intvalue holds stringid (see StringID intvalues)
SHUFFLE 20 Shuffle results
PLAYTIMELIMIT 21 Limit playtime to # minutes (in intvalue)

Token Entry

Field Size Description
kind 1 Token type (see Token Types)
spelling 255 Text of a TOKEN_STRING
intvalue 4 Intvalue of this token

Token file

# Token Entries
1 EOF Token entry.
EOF

Todo

  1. optimize album / artist names.
  2. dynamic caching for targets with less ram (i have no idea how to do this (HCl))

Suggestion to change interface of searchengine and databox

(This is probably not really the right place to put this, maybe I should move it into an RFE? Sourceforge is acting up though...)

I propose that the code of the current two rocks are merged into one, in the following way:

The new plugin should be available both through the "View Plugins" menu, and the "Open with" menu. This is not possible right now, but probably shouldn't be too hard.

When running the plugin from the pluginlist, show a menu:

  • Create new search - opens edit mode
  • Saved searches - shows a list of searches in .rockbox/searches/ where "entering" each would work as if it was run in the filebrowser.

When running an .rsp file, show the menu (with the filename at the top, I guess):

  • Run and play - executes the query, add results to playlist
  • Run and save playlist - executes the query, asks for a filename and saves the .m3u
  • Edit - opens editmode

When the user has finished editing a search, show the following menu:

  • Run and play - executes the query, add results to playlist
  • Run and save playlist - executes the query, asks for a filename and saves the .m3u
  • Save searchfile - ask for filename (make the default .rockbox/searches/search.rsp), save an .rsp and quit

Results

The original use scenarios are still available

  • Creating an .rsp file by going into "View plugins".
  • Opening an .rsp file and saving a playlist (though with a single extra step).

Additionally, the following things become possible:

  • Creating running and playing a search in one go, without creating any files.
  • Creating a playlist of a search without having to first save the .rsp.
  • Editing, then saving a search without having to go into the menu.

I really think this would boost useability of the search


CategoryPlugin: Database Searchengine [PlayerDONE, RecorderDONE, OndioDONE, iRiverDONE]

{ Edit | View raw | Attach | Ref-By | Printable | Diffs | r1.18 | > | r1.17 | > | r1.16 | More }
Revision r1.18 - 06 Sep 2005 - 16:26 GMT - JonasHaeggqvist Copyright © 1999-2005 by the contributing authors.